package com.naiterui.ehp.bs.doctor.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Entity
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "dr_login_log")
public class LoginLog implements java.io.Serializable {
    private static final long serialVersionUID = -4648087427946353270L;

    public static final int TYPE_DOCTOR = 1;
    public static final int TYPE_PHARMACIST = 2;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;
    @Column(name = "user_id")
    private Long userId;
    @Column(name = "type")
    private Integer type;
    @Column(name = "name")
    private String name;
    @Column(name = "phone", nullable = false, length = 11)
    private String phone;
    @Column(name = "operate", nullable = false, length = 50)
    private String operate;
    @Column(name = "login_time")
    private Date loginTime;
    @Column(name = "device_sn")
    private String deviceSN;
    @Column(name = "model")
    private String model;
    @Column(name = "ip")
    private String ip;
    @Column(name = "login_addr")
    private String loginAddr;
    @Column(name = "created_by")
    private String createdBy;
    @Column(name = "created_at", length = 19)
    private Date createdAt;

}